<!DOCTYPE html>
<html>
<head>
    <title>关键词</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <i-col span="4">
                <i-input v-model="q.keyword" @on-enter="query" placeholder="关键词"/>
            </i-col>
            <i-button @click="query">查询</i-button>
			#if($shiro.hasPermission("keywords:save"))
            <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
			#end
			#if($shiro.hasPermission("keywords:update"))
            <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
			#end
			#if($shiro.hasPermission("keywords:delete"))
            <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
			#end
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="keywords" :rules="ruleValidate" :label-width="80">
            <Form-item label="关键词" prop="keyword">
                <i-input v-model="keywords.keyword" placeholder="关键词"/>
            </Form-item>
            <Form-item label="热销" prop="isHot">
                <Radio-group v-model="keywords.isHot">
                    <Radio label="1">
                        <span>是</span>
                    </Radio>
                    <Radio label="0">
                        <span>否</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="默认" prop="isDefault">
                <Radio-group v-model="keywords.isDefault">
                    <Radio label="1">
                        <span>是</span>
                    </Radio>
                    <Radio label="0">
                        <span>否</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="显示" prop="isShow">
                <Radio-group v-model="keywords.isShow">
                    <Radio label="1">
                        <span>是</span>
                    </Radio>
                    <Radio label="0">
                        <span>否</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="排序" prop="sortOrder">
                <i-input v-model="keywords.sortOrder" placeholder="排序"/>
            </Form-item>
            <Form-item label="跳转链接" prop="schemeUrl">
                <i-input v-model="keywords.schemeUrl" placeholder="关键词的跳转链接"/>
            </Form-item>
            <Form-item label="类型" prop="type">
                <Radio-group v-model="keywords.type">
                    <Radio label="0">
                        <span>0</span>
                    </Radio>
                    <Radio label="1">
                        <span>1</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/shop/keywords.js?_${date.systemTime}"></script>
</body>
</html>